<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <!--在HTML元素中直接执行JavaScript代码（不推荐）-->
  <a onclick="alert('弹出弹窗')">弹出弹窗</a>
  <a href="javascript:alert('弹出弹窗')">弹出弹窗</a>
  <!--外部引入JavaScript（真实开发）-->
  <script src="./js/test.js"></script>
</body>

</html>